<template>
	<view class="all">
		<view class="nav-box">
			<!-- <view class="left">返回</view> -->
			<!-- <navigator 
			open-type="switchTab" 
			url="/pages/index/index" 
			class="iconfont iconfanhui icon-nav" 
			></navigator> -->
		</view>
		<view class="main">
			<view class="title">支付码</view>
			<view class="text">向商家展示该码，以便支付</view>
			<image class="img" :src="scr" v-show="showImg">
			</image>
			<image class="img2" :src="scr" v-show="!showImg">
			</image>
			
			<!-- <view class="new">刷新</view> -->
			<button @click="refresh" class="new">点击刷新</button>
			
			
			<image class="p" :src="scr">
				
			</image>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				showImg:true
			}
		},
		methods: {
			refresh(){
				this.showImg = !this.showImg,
				uni.navigateTo({
					ur1:"/pages/myCode/myCode"
				})
			}

		}
	}
</script>

<style>
.all{
	height:100%;
}
.nav-box{
	background-color: #1D65E3;
}
.main{
	margin-top: 50px;
	background-color: #ffffff;
	border: 2px solid white;
	border-radius: 20px;
	height: 500px;
}
.title{
	margin-top: 20px;
	text-align: center;
	font-size: 20px;
	font-weight: bold;
}
.text{
	margin-top: 25px;
	text-align: center;
	font-size: 15px;
	color: #8a8a8a;
	
}
.img{
	width: 200px;
	height: 200px;
	border-radius: 10%;
	background-image: url('../../static/fumou-center-template/code2.png');
	background-size: cover;
	display: block;
	margin: 20px auto;
}
.img2{
	width: 200px;
	height: 200px;
	border-radius: 10%;
	background-image: url('../../static/fumou-center-template/code4.png');
	background-size: cover;
	display: block;
	margin: 20px auto;
}
.new{
	text-align: center;
	color: #d38900;
	width:160px;
}

.p{
	display: block;
	margin: 20px auto;
	width: 300px;
	height: 60px;
	border-radius: 10%;
	background-image: url('../../static/fumou-center-template/p123.png');
	background-size: cover;
}

</style>

<style>
	page {
	    background-color: #1D65E3;
	}
</style>


